import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue';
import {fileURLToPath, URL} from 'node:url'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server:{
    host:'0.0.0.0',
    port:8008, // 启动端口号
    open:true  // 启动后是否自动打开网页
},
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  },
  css: {
    preprocessorOptions: {
      scss: {
        // additionalData: `$injectedColor: orange;`
        additionalData: '@import "@/styles/variables.scss";'
      }
    }
  }

})
